package ooad.gof.factory.springFactory;

import ooad.gof.factory.Driver;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Spring是工厂模式的实现框架
 * Spring也被称为超级大工厂
 *
 */
public class Client {
    public static void main(String args[]){
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        Driver driver = (Driver) context.getBean("driver");
        driver.drive();
    }
}